
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>两种方式 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../end/" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../howtouse/">
            
                <a href="../howtouse/">
            
                    
                    环境搭建
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../howtouse/nodejsinstall.html">
            
                <a href="../howtouse/nodejsinstall.html">
            
                    
                    Node.js安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../howtouse/gitbookinstall.html">
            
                <a href="../howtouse/gitbookinstall.html">
            
                    
                    Gitbook安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../howtouse/gitbookcli.html">
            
                <a href="../howtouse/gitbookcli.html">
            
                    
                    Gitbook命令行速览
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../book/">
            
                <a href="../book/">
            
                    
                    创建项目
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../book/file.html">
            
                <a href="../book/file.html">
            
                    
                    初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../book/prjinit.html">
            
                <a href="../book/prjinit.html">
            
                    
                    内容编辑
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../output/">
            
                <a href="../output/">
            
                    
                    本地预览
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../output/outfile.html">
            
                <a href="../output/outfile.html">
            
                    
                    生成目录文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../output/pdfandebook.html">
            
                <a href="../output/pdfandebook.html">
            
                    
                    生成预览文件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="./">
            
                <a href="./">
            
                    
                    输出静态网站
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.5.1" data-path="gitpages.html">
            
                <a href="gitpages.html">
            
                    
                    两种方式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../end/">
            
                <a href="../end/">
            
                    
                    项目部署
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >两种方式</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x8F93;&#x51FA;&#x9759;&#x6001;&#x7F51;&#x7AD9;">&#x8F93;&#x51FA;&#x9759;&#x6001;&#x7F51;&#x7AD9;</h1>
<ul>
<li><p>&#x6709;&#x4E24;&#x79CD;&#x65B9;&#x5F0F;&#x53EF;&#x4EE5;&#x8F93;&#x51FA;&#x4E00;&#x4E2A;&#x9759;&#x6001;&#x7684;&#x7F51;&#x7AD9;</p>
<p>PS&#xFF1A;&#x65E0;&#x8BBA;&#x54EA;&#x79CD;&#x65B9;&#x5F0F;&#xFF0C;&#x90FD;&#x53EF;&#x4EE5;&#x5C06;&#x8FD9;&#x4E2A;&#x9759;&#x6001;&#x7F51;&#x7AD9;&#x6253;&#x5305;&#xFF0C;&#x53D1;&#x5E03;&#x5230;&#x60F3;&#x8981;&#x53D1;&#x5E03;&#x7684;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#xFF0C;&#x6216;&#x8005;&#x76F4;&#x63A5;&#x5C06;&#x8FD9;&#x4E2A;&#x6253;&#x5305;&#x6587;&#x4EF6;&#x7ED9;&#x9605;&#x8BFB;&#x8005;&#x3002;</p>
</li>
</ul>
<h3 id="1-&#x672C;&#x5730;&#x9884;&#x89C8;&#x81EA;&#x52A8;&#x751F;&#x6210;">1. &#x672C;&#x5730;&#x9884;&#x89C8;&#x81EA;&#x52A8;&#x751F;&#x6210;</h3>
<ul>
<li>&#x6267;&#x884C;&#x8BE5;&#x547D;&#x4EE4;&#x4E4B;&#x540E;&#xFF0C;gitbook&#x9879;&#x76EE;&#x7684;&#x76EE;&#x5F55;&#x4E2D;&#x4F1A;&#x591A;&#x4E00;&#x4E2A; <code>_book</code> &#x76EE;&#x5F55;&#xFF0C;&#x800C;&#x8FD9;&#x4E2A;&#x76EE;&#x5F55;&#x4E2D;&#x5C31;&#x662F;&#x751F;&#x6210;&#x7684;&#x672C;&#x5730;&#x9884;&#x89C8;&#x7684;&#x9759;&#x6001;&#x7F51;&#x7AD9;&#x5185;&#x5BB9;&#x3002;</li>
</ul>
<pre><code>gitbook serve
</code></pre><h3 id="2&#x6253;&#x5305;&#x9879;&#x76EE;&#x751F;&#x6210;">2.&#x6253;&#x5305;&#x9879;&#x76EE;&#x751F;&#x6210;</h3>
<ul>
<li><p>&#x6253;&#x5305;&#x6210;&#x529F;&#x4E4B;&#x540E;&#xFF0C;&#x9ED8;&#x8BA4;&#x8F93;&#x51FA;&#x7684;&#x6587;&#x4EF6;&#x653E;&#x5728; <code>_book</code> &#x6587;&#x4EF6;&#x5939;&#x91CC;&#x9762;&#xFF0C;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x7684;&#x8F93;&#x51FA;&#x4F4D;&#x7F6E;&#x662F;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#xFF0C;&#x7F16;&#x8BD1;&#x4E4B;&#x540E;&#x7684;&#x5165;&#x53E3;&#x5747;&#x4E3A;&#xFF1A; <code>index.html</code></p>
<p><strong>&#x6CE8;&#x610F;&#xFF1A;</strong>&#x5982;&#x679C;&#x5728;&#x6253;&#x5305;&#x9879;&#x76EE;&#x4E4B;&#x524D;&#x751F;&#x6210;&#x8FC7;&#x672C;&#x5730;&#x9884;&#x89C8;&#x6587;&#x4EF6;&#xFF0C;&#x90A3;&#x4E48;&#x6253;&#x5305;&#x6587;&#x4EF6;&#x4E2D;&#x4E5F;&#x4F1A;&#x5305;&#x542B;&#x672C;&#x5730;&#x9884;&#x89C8;&#x6587;&#x4EF6;&#x3002;</p>
<p>&#x200B;           &#x5728;&#x6CA1;&#x6709;&#x751F;&#x6210;&#x8FC7;&#x672C;&#x5730;&#x9884;&#x89C8;&#x6587;&#x4EF6;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x5B9E;&#x9645;&#x4E0A;&#x6253;&#x5305;&#x9879;&#x76EE;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x5185;&#x5BB9;&#x548C;&#x672C;&#x5730;&#x9884;&#x89C8;&#x6587;&#x4EF6;&#x4E24;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x5185;&#x5BB9;&#x6CA1;&#x6709;&#x592A;&#x5927;&#x5DEE;&#x5F02;&#x3002;</p>
</li>
</ul>
<pre><code>gitbook build ./{book_name} --output=./{outputFolde}
gitbook build [&#x5F53;&#x524D;&#x8DEF;&#x5F84;] [&#x8F93;&#x51FA;&#x8DEF;&#x5F84;]
gitbook build ./ doc # &#x9ED8;&#x8BA4;&#x6253;&#x5305;&#x8F93;&#x51FA;&#x5230;&#x5F53;&#x524D;&#x8DEF;&#x5F84;&#x4E0B;&#x9762;&#x7684; doc &#x6587;&#x4EF6;&#x5939;&#x4E2D;
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 输出静态网站">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../end/" class="navigation navigation-next " aria-label="Next page: 项目部署">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"两种方式","level":"1.5.1","depth":2,"next":{"title":"项目部署","level":"1.6","depth":1,"path":"end/README.md","ref":"end/README.md","articles":[]},"previous":{"title":"输出静态网站","level":"1.5","depth":1,"path":"publish/README.md","ref":"publish/README.md","articles":[{"title":"两种方式","level":"1.5.1","depth":2,"path":"publish/gitpages.md","ref":"publish/gitpages.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"publish/gitpages.md","mtime":"2023-02-13T03:56:42.942Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-02-13T07:57:16.450Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

